package org.hcyspartnoc.demo.pojo.dto.system;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

@Data
@NoArgsConstructor
public class SysUserPhoneRegisterDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "手机号不能为空")
    @Length(min = 11, max = 11, message = "手机号格式不正确")
    private String phone;

    @NotBlank(message = "验证码不能为空")
    @Length(min = 6, max = 6, message = "验证码必须为6位")
    private String verificationCode;

    @NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 20, message = "密码长度必须在6到20个字符之间")
    private String password;

    @NotBlank(message = "确认密码不能为空")
    @Length(min = 6, max = 20, message = "确认密码长度必须在6到20个字符之间")
    private String confirmPassword;

    @NotNull(message = "是否同意用户协议必须选择")
    private Boolean agreeToTerms;

}
